<script language="javascript">
  contactDialogMode = '<?php echo $dialog_mode?>';
</script>
<div class="box">
  <div class="form_title">
    <?php echo $search_title ?>
  </div>
  <?php 
    echo 
      form_tag(
        $myContactSearchForm->getUrl(),
        array(
          'id'=>'formContactSearch',
        )
      )
  ?>
  <?php echo $myContactSearchForm['_csrf_token']?>
    <table>
      <tbody>
        <?php $myContactSearchForm->renderFields()?>
      </tbody>
      <tfoot>
        <tr>
          <td class="form_buttons"  colspan="6">
            <input type="submit" value="Search"/> | 
            <input type="reset" value="Reset"/>
          </td>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<br/>
<div id="<?php echo sfConfig::get('app_windows_contact_grid_id')?>" style="width:800px;vertical-align:top;">
</div>
<a href="#" id="<?php echo sfConfig::get('app_windows_contact_show_grid_id')?>" style="display:none">Show Search Results</a>

<script language="javascript">
  $(document).ready(
    function(){
      contactSetupSearchForm();
      contactSetupShowSearchGrid();
    }
  );
</script>